package com.example.springmvcdemo1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TeacherController {
    //请求转发
    @RequestMapping("/fw")
    public String test() {
        return "forward:/index.html";
    }
    //请求重定向
    @RequestMapping("/re")
    public String test1() {
        return "redirect:/index.html";
    }
}
